/**
* 版权声明：厦门睿商网络科技有限公司 版权所有 违者必究
* 日    期：2020-03-25
*/
package com.rzico.basics.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.ArrayList;
import java.util.List;

/**
 * <pre>
 *   优惠券数据库对象
 * </pre>
 * @author Rzico Boot
 * @version 1.0
 */
@Data
@JsonIgnoreProperties(value = {"handler"})
@JsonInclude(JsonInclude.Include.NON_NULL)
@Table(name = "wx_coupon")
public class Coupon{

    @Id
    @ApiModelProperty(value = "" )
    protected Long id;

    @ApiModelProperty(value = "创建日期" )
    protected java.util.Date createDate;

    @ApiModelProperty(value = "修改日期" )
    protected java.util.Date modifyDate;

    @ApiModelProperty(value = "券名称" )
    protected String name;

    @ApiModelProperty(value = "使用规则" )
    protected String introduction;

    @ApiModelProperty(value = "优惠金额/折扣/补邮费" )
    protected java.math.BigDecimal amount;

    @ApiModelProperty(value = "使用起始日期" )
    protected java.util.Date beginDate;

    @ApiModelProperty(value = "使用结束日期" )
    protected java.util.Date endDate;

    @ApiModelProperty(value = "审核状态 {0:待审核,1:已审核}" )
    protected Integer status;

    @JsonIgnore
    @ApiModelProperty(value = "是否删除" ,hidden = true )
    protected Boolean deleted;

    @ApiModelProperty(value = "使用条件(满额)" )
    protected java.math.BigDecimal minimumPrice;

    @ApiModelProperty(value = "使用范围 {0:全场,1:店内,2:商城}" )
    protected Integer scope;

    @ApiModelProperty(value = "优惠方式 {0:满减券,1:折扣券,3.兑换券}" )
    protected Integer type;

    @ApiModelProperty(value = "兑换类型 {0:商品券,1:套餐券,2:水票}" )
    protected Integer subType;

    @ApiModelProperty(value = "发行数量" )
    protected Long stock;

    @ApiModelProperty(value = "券类型 {0通用券,1:品牌券,2:会员券,3:分类券,4.商品券,5.兑换券}" )
    protected Integer targetType;

    @ApiModelProperty(value = "指定可兑换商品" )
    protected Long goods;

    @ApiModelProperty(value = "指定可兑换产品" )
    protected Long productId;

    @ApiModelProperty(value = "可兑换数量" )
    protected Long quantity;

    @ApiModelProperty(value = "每人限领张数/月限量" )
    protected Long maxgiven;

    @ApiModelProperty(value = "投放方式 {0:可领取,1:活动送}" )
    protected Integer mode;

    @ApiModelProperty(value = "归属企业" )
    @Column(name = "enterprise_id")
    protected Long enterpriseId;

    @JsonIgnore
    @ApiModelProperty(value = "创建者" ,hidden = true )
    protected String createBy;

    @JsonIgnore
    @ApiModelProperty(value = "更新者" ,hidden = true )
    protected String modifyBy;

    /**
     * 当前对象的结果信息
     */
    protected List<CouponTarget>  targets = new ArrayList<CouponTarget>();

    @ApiModelProperty(value = "可领张数" )
    protected Long canStock;

}
